package com.example.demo.config;

import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.example.demo.aop.MybatisHisDataIntercepts;

@Configuration
public class MybatisInterceptorConfig {
	@Bean
	public String myInterceptor (SqlSessionFactory sqlSessionFactory) {
		sqlSessionFactory.getConfiguration().addInterceptor(new MybatisHisDataIntercepts());
		return "interceptor";
	}
}
